package com.wk.token;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.sun.deploy.security.BlockedException;
import org.springframework.stereotype.Service;

@Service
public class SentinelService {

	@SentinelResource(value = "name",blockHandler = "fail")
	public String success(){
		System.out.println("正常请求");
		return "正常请求";
	}

	public String fail(BlockedException b){
		System.out.println("阻塞请求");
		return "阻塞请求";
	}

}
